package com.fau.hm.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.json.simple.JSONAware;
import org.json.simple.JSONObject;

/**
 * @desc 企业热线号码实体类
 * @author dangjh
 * @datetime 2014年12月14日 下午8:54:54
 */
@Entity
@Table(name = "medical_enterprise_outside")
public class MedicalEnterpriseOutside implements Serializable, JSONAware {

	private static final long serialVersionUID = 6409510094387119560L;

	private String id;
	private String eid;
	private String outSideNum;
	
	@Id
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@GeneratedValue(generator = "generator")
	@Column(name = "id", length = 32)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "eid", length = 32)
	public String getEid() {
		return eid;
	}

	public void setEid(String eid) {
		this.eid = eid;
	}

	@Column(name = "outside_num", length = 20)
	public String getOutSideNum() {
		return outSideNum;
	}

	public void setOutSideNum(String outSideNum) {
		this.outSideNum = outSideNum;
	}

	@SuppressWarnings("unchecked")
	@Override
	public String toJSONString() {
		JSONObject obj = new JSONObject();
		obj.put("id", id);
		obj.put("eid", eid);
		obj.put("outSideNum", outSideNum);
		return obj.toJSONString();
	}

}
